Trying to fix window problem