Fix compile errors debug flag