Fixes #428
Now does a sanity check after 1s and if the width of a window < 300 increases size to 300, similarly if height < 300 it resize it to 300.