Minor fixes to railgun