small fix to arrayOccurrence
fix to debbugin messages