fix style and db issue