added fix methid to deal with negative indices