fix grideditor bug
handle script hooks in replay, fix tests, fix #402