fix can not erase colored rectangle issue