fixed error where returning false always