More fixes. Added tests that need fixing