fix bug with statusbar, delete obsolete code