Merge pull request #183 from lexaknyazev/tweaks

Style tweaks and bugfix