Added small if statement to prevent double insertion