Fixed window positioning bug