fixing instancetype issue, with possible crasher.