fixed bugs for both assign and check, front end and back end