Bug fixes from v0.2