A number of fixes

A number of fixes