fixed bug in minimize window script