Gun was being stowed, pilot tells police

Handgun went off inside cockpit of US Airways jet in flight