added proper behaviour for populations at 0
Merge remote-tracking branch 'origin/master'