A couple changes

Corrections to a few functions