Temporary fix constants checking method

See https://stackoverflow.com/a/16071333