Fixed handles working with parent class

Resolved issue #376