Fixed unsafeCoerce bug