Fix bug when retrieving constant