Add case/when for debug