fix in menu and added connection close function for mysql