TSAGE: Fix CID 1002393, 1002395, 1002396. Get rid of some magic values