color set too early bug fix