Fixed problem with canceling during pending

Change-Id: Icbe3cd39fa28d6561607e679e3e7cd5b2a64751a
Closes-bug: #1369979
Merge "Fixed problem with canceling during pending"