Some bug fixes. Updated to v0.2.2