Progress bar and fix some bug