Small bug fix - be wary of switch statements!