Fix #1540
Fix #1527
Merge pull request #1555 from sabian/0.8

Задачи #1527, #1540