Small fixes

Two things I found while developing the new IR but have nothing to do with it and can be merged independently.