change tab to spaces
fix bug for code review