Moved the _main_event notification in the handle_data method in the Server module up and added a small sleep so that there is no way Rule code is executed before it is the next player's turn (which would be undefined behavior)