Changed some logic.