Added sanity to the receipt printing logic.