JS-252 Bug fixes to last commit.