create and db bug fixes