safeApply bug fixed