Changed query so that all days an event occurs on can be marked. Also fixes index out of bounds error.