Fixed missed handing of error condition
Authored by: artyom-beilis 2010-11-10
Parent: [r1512]
Child: [r1514]