fix bug in invalid reference exception throwing
fix bug in invalid reference exception throwing

Signed-off-by: Jordan Wilberding <c75c9afa7ab32355502e631bdcd27e5db15b49c6@gmail.com>

hhkbp2/joxa,ericbmerritt/joxa