fix some front end bugs