Fix segfault on current

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>