Bugfix. Using constant not variable