fixing NoSuchMethodException when enclosing class is extended