Fixed problem when several windows where superposed