assert when OnHandleData is not a lua function and polish.