Adjusted DEBUG code