Crude fix for accessing an array at a negative index.