bugfixes after commit c6b1faa1ca9b7877be7e74b10ccb518dcab8fe18
Merge pull request #3112 from quantum13/empty

[2.0.0] bugfixes after removing empty