fixed api-mp undefined variable error