Fixed some issues in gcalctool.
Fixes #272.