Fix a bug with rail gun.