Fix #35, fix #24