Fixed bug... thx Mrkvozrout... if you refactoring something, please
check the functionality.

Signed-off-by: Mr.FrAnTA <michal.dekany@seznam.cz>