ProgressDialog fixed. Now it pops up when processing starts and disappears when finish.