Could also be a lighting issue compiled with stress - the fact that it didn't come out unless the tank was dark in the begining is an indication of light issues. The coral may not have been healty to begin with...course it probably looked fine when you purchased it right?