update sugar, fix error guard