Fixes Index Bug