fixing #172
fixed #170
Merge branch 'dev' into 0.9