Changes to properly support S4 methods

Also handle the case where eval has an error.