fix #133 and #132