fixed error api create to database