Fixed some bug

Need a code review