fixing indices