Fix an unintentional(?) double-space and change a comparison with NULL
Fix an sqlFail message and correct a typo on a comment