Fixed mysql issues(?)