Population function and collision fixes.