Some fixes by PaGrom
Merge pull request #1 from PaGrom/master

Some fixes