Bug fixes and misc changes. (v0.2.6)