Fix for issue 64, event loop