After review pull

Some fixes done by Andrey to Antanas's commit