Fixed a bug in remove gene.

Replaced pop() with the correct function, remove().