fix matlab compile bug