Fixed wrong indexes