Added fix for instanceof for derived 'clases'