Added and fixed inference mode 7-8