some more ABORT and return code bug fixes