fix all bugs

This fixes all the bugs with the routing