fixed it getting into bad draw state