Bug fix on handling ack or nack