Fixes logic error in 'processDbResult'