Fixed mysql foreign key failure