Jason's fix for the insert method