Fixed gamma functions acting on whole desktop.

Fixes #336.