several bug fixes
v0.1b13