Fixed lingering weird memory issues when moving windows