test and fixed #136 and #137