[TASK] Code style
[FIX] Don't set a larger window size than possible