Minor bug fixes to the way SGA is run