fix bug for window bat