Database tables errors solved