Debug imporvements