fixed some misc issues with prior commit