fix bunch of front end bug