fixed index and stuff