fixing constant evaluation bugs