changes to compile with rustc v0.12