fixed bug with dummy window popping up