Fix bug for empty