Parallel debug and several fixes of GSA toolbox

Please pull my commits on parallel and GSA. Thanks a lot to Johannes who pointed out several issues.