Fix warnings and Cabal compat