minor bugs fixed
both front and back end modified with some minor bugs fixed