Remove some bug and add right validation