Bug fixes. More clear debug messages.