fix #25 and fix #28