Sincere apologies for the issues. I wasn't aware of the need for a cast but after reading the PRs, I understand that now. On the other hand, the incorrect test case was simply a major oversight on my part.
I'll be sure to be more careful next time. Thanks for the fixes!