Fix to problem first_and_last_occurences
Merge branch 'master' into production