Fixing minor bugs with IO and the domain