Fixed to also catch NoSuchMethodException