Fixes UnicodeEncodeError sometimes
Merge pull request #376 from midiotthimble/sql-panel-refactor

Fixes UnicodeEncodeError sometimes