Fixed the recursion issue which came with the last out of bound fixe