Fix error condition (thanks, Marcin).