Some fixes and gui improvements