Made a couple of defines safer