fix of #498, #493, #494 - because disappeared in last commit
Merge pull request #501 from mariroz/dev

fix of #498, #493, #494 - because disappeared in last commit