deal with a horrendous design issue by MALLOC