added a couple more sanitisation checks