fixing behaviour for empty values.