Fixed qstat so it will not always return 0. It will return
the proper error code when it fails. TRQ-2304