Fixed issue where its not checking for actual success value