Bug fixes

A couple data type conversion errors corrected.