Fix bug in routes parsing