bugs creating and adding to database