changes to make entity scanning work