initial commit to fix #192 and #193