various fixes for new definition API