Fixed bugs in previous versions