Fixed compatibility with nette

see https://github.com/nette/nette/commit/26192c65653c27978806f8e391ff22cad3e10764