Fixed limitation on this main function that affects al getSugar triggers. This commit also fixes other bugs 5819 and 7963