Fix bugs with front-end