SAGE and sigma fixes.

@markpizz Is this what you meant by combining them into a single commit?