fixed some windowing problems