Fixed bugs in onscreen display and fullscreen mode