Fixed bug where labels showed incorrect indexes