Fix wrong info returned on undefine error