Try to make custonfunctioncall safe