Fix a bug in chameleon