fix warning log if index or assign is wrong
changes