bugfix: new node could be created partially outside the window