fix this and show progress bar correctly