Fixed Insert function