fix for null value in edit mode