Fixed Database errors

Signed-off-by: Justin Wiblin <the_lone_devil@justin-wiblin.tk>