Fixed up as per comments