fixed recursive error handling on instantiation