fix execute method in ApiMethod