wrong boolean logic