I was thinking of maybe wrapping this up in a macro at some point as it's such an ugly cast, what do you think?