Added router logic to check for bad controllers and actions