bugfix for NULLs in varchar fields