Fixed #677: Request is not properly unlocked if an exception occurs
merge bde5c75839ad61762f6575c7a7af94d04649660e