fix loading index