Added support for negative indices