try to avoid nil pointer