Fixed bug introduced by extracting constants as global variables