fixing small bugs in front end after refactor.