fixed problem with fading and window dimesions