many bug fixing

so many fixings...