TSAGE: Fix CID 1047257 and 1002397