Fix solution for insertAt