Fix bug with register route