bug #1562 - new tests

https://gist.github.com/novirael/cf3ef0883fe517fce94e#file-gistfile1-txt