Removed some warnings, fixed a bug of progress bar