small bug fix of how isinstance being called