Modified assim detection to use last iuse val instead of mode