Fixed some poo database issues