Fixed a block execution bug in safelyExecuteBlockOnMainThread.