some fixes to compile with ION