AF upgrade; guaranteeing new pids from next_pid
gem updates