bugfixes and improvement to menu