Fix #26 and fix #27