Prevent resize of window due to weird bug which goes into infinite
recursion.