Fix minimum window size/scaling bug