Modify flx to return error code properly.