fix constant generation bug due to 3605f8cc