fix crash for empty values