Fixed layout and key event handling (back key did not work).