fix bugs in const propagation