Fixing a bug in a previous commit that I've somehow missed

The code from the previous commit was throwing some nasty errors.
This was due to liftIO + unsafeCoerce, the HValue was already extracted
from IO so liftIO was probably the one causing errors.
Make the error messages prettier