added fit option to scroll window to ensure new element fits on screen