Minor fixes for merged code