Bug Fix

Fix Bugs With DB