Essential bug fixes for 0.2.