Fix routes (better error handling)