Fixed spawn rate function