fix dynamic constant assignment