corrected typo in variable name
reduced delay during database creation loop