Improved error handling
Better handling of menu close signals