Handling invalid routes better