Fixed pointer to correct insert statement