Fix packaged resources and debug mode