fix trimming NULL value