corrected entity.sql lookup error