Fixed a @selector issue and put if conditions in progress and completion handlers