Fixing log message.
Fixing logic.