fixed context arry index issue