Fixed some bugs and modified README