fixed a few bugs with autorouting and screen resizing