Whoopi Goldberg took director Rip Torn and the film's producers to court to prevent the film's release due to a disagreement over control over the final cut of the film. She lost.
The script was originally written in mind for Robin Williams, but Williams turned it down and the lead role went on to his Comic Relief USA partner Whoopi Goldberg.
Whoopi Goldberg constantly ignored the script and improvised (supposedly at the behest of New World Pictures, which was financing the film). It got to the point where Rip Torn was begging and pleading with her to do at least one take of each of her scenes as written.
Harry Nilsson, Terry Southern and Rip Torn put a cut of the takes Whoopi Goldberg had done according to the script together and took it to Sundance, where it attracted some interest. However, New World sabotaged them by putting the film out in a very limited release around that same time-using the takes Goldberg had improvised instead.