Fix compile issue: patch from Martin Svec