Fix error where routes would be chopped off before being passed to the controller