Fix access to global variable

Signed-off-by: Michal Čihař <michal@cihar.com>