Insert into database
Fixed code