some bugfixes and layout improvements