added constants check

Solves #40