also resolve global constants and provide goto #327