backporting for nette 2.0.x