Bug proof
fix npe of managedInstance hashCode
Merge pull request #170 from asimarslan/issue-167-2

fix Issue 167