Removed connection close from createProject. Not sure why, but it was firing before database operations had finished.