Fixed XFlush bug; worked progress bar