anchor.diff:  init_result(Starter, Parent, ServerRef, Module, Result, Opts) ->
       case Result of
   	{CallbackMode,State,Data} ->
  -	    proc_lib:init_ack(Starter, {ok,self()}),
  -	    enter(
  -	      Module, Opts, CallbackMode, State, Data,
  -	      ServerRef, [], Parent);
  +	    case callback_mode(CallbackMode) of
  +		true ->
  +		    proc_lib:init_ack(Starter, {ok,self()}),
  +		    enter(
  +		      Module, Opts, CallbackMode, State, Data,
  +		      ServerRef, [], Parent);
  +		false ->
  +		    Error = {bad_return_value,Result},
  +		    proc_lib:init_ack(Starter, {error,Error}),
  +		    exit(Error)
  +	    end;
   	{CallbackMode,State,Data,Actions} ->
  -	    proc_lib:init_ack(Starter, {ok,self()}),
  -	    enter(
  -	      Module, Opts, CallbackMode, State, Data,
  -	      ServerRef, Actions, Parent);
  +	    case callback_mode(CallbackMode) of
  +		true ->
  +		    proc_lib:init_ack(Starter, {ok,self()}),
  +		    enter(
  +		      Module, Opts, CallbackMode, State, Data,
  +		      ServerRef, Actions, Parent);
  +		false ->
  +		    Error = {bad_return_value,Result},
  +		    proc_lib:init_ack(Starter, {error,Error}),
  +		    exit(Error)
  +	    end;
   	{stop,Reason} ->
   	    gen:unregister_name(ServerRef),
   	    proc_lib:init_ack(Starter, {error,Reason}),
  
positive.code: 	    gen:unregister_name(ServerRef),
  	    proc_lib:init_ack(Starter, ignore),
  	    exit(normal);
  	Other ->
  	    Error = {bad_return_value,Other},
  	    proc_lib:init_ack(Starter, {error,Error}),
  	    exit(Error)
      end.
  
negative.code: 	Actions :: [action()] | action()) ->
  			no_return().
  enter_loop(Module, Opts, CallbackMode, State, Data, Server, Actions) ->
      case is_atom(Module) andalso callback_mode(CallbackMode) of
  	true ->
  	    Parent = gen:get_parent(),
  	    enter(
  	      Module, Opts, CallbackMode, State, Data, Server,
  	      Actions, Parent);
  	false ->
  	    error(
  	      badarg,
  	      [Module,Opts,CallbackMode,State,Data,Server,Actions])
      end.
  
  %%---------------------------------------------------------------------------
  %% API helpers
  