fixed some stuff for mysqli