Fixed up occurance check