Fixing the warning 500 when the data type is different from what mysql expects