fix windowlevel bug