fixed program close on exiting label management window. changed all ways
of exiting windows to shell.close()