Null pointer premature ejaculation

Fix to prevent use of null pointer in subtraction.