Several fixes

This fixes several issues, including the fact that you have the wrong module name! So I'm a bit confused as to what's going on; the version on hackage (which I couldn't easily build in my usual environment due to version constraints; I'm trying it in a sandbox just now) also appears to have this problem.

Anyway, hope this helps.