Modify extension to make it work in non tenant mode