Fixed bug in indexing buttons