Bug fixes from 0.9.9 release