Fixed Terminal Resize bug