Fix crashes in GUI button.
Merge pull request #26 from kaeza/wut

Fix crashes in GUI button.