MySQL and constructor fixes