Fixes from Konstantin comments.