fix magic integration routing