fixed broken stack trace when missing custom ref