Fix for strict aliasing error

This will fix two rather nasty strict-aliasing errors encountered during compilation