Bit of a strange fix but seems to work