Fix Window resize functions