Fixed #753: Request is not properly unlocked if an exception occurs