FIXED bad ref error message now has correct type info

Signed-off-by: Michael Vorburger <mike@vorburger.ch>