Merged some missing changes from Igor

This change contains missing changes from Igor.