Fix #59
Finish fix #258