fix some bug in front end