Fix debug errors