Debug errors fix