fixed bug #2 for proper menu rendering