fixed lots bug & improved manage.js