function routes fix