fixing erronieus check