fixed db schema issues