Fixed the "duplicate" option for population evolution. Also added some "error()" in the code to break the code as soon as something goes wrong.