Fix #159
Fix #152
Fix #150