Fixed broken insert/update on mysql