fix up dream code