Fixed #679 and Fixed #665

Not sure if this is the only place where this should be added, but for the test cases I could think of this seemed to work.
Re-enabled tests hitting issue #679 and #665