A few fixes for the railgun etc.