bugfixes + work on main gui