fix to work with prelude 1.0.0
Merge pull request #320 from viclib/master

fix #306 and #313