bug fix: check was always false