Made shape drawing not leak state.
Reviewer suggestions.
Merge pull request #184 from SirVer/bug_fixes

Made shape drawing not leak state.