Solved array out of bound bug in MapSolutions