Fixed issue with the menu button not working. Issue also resolved with the length not being computed directly.