Fix according to @mglukhovsky comments