corrects behaviour for empty values