Should fix #167 and #168