Added some edge cases

Signed-off-by: timdrew <tim@timdrew.com.au>