bugfixes for smaller windows