TSAGE: Fix CID 1003935, 1003723, 1002377 and 1002376