Fix dynamic method definition