small window code fix