Fix bug for challenges: pt 4, 6