fix for empty values in js