Modify to obtain actividads and fix to save error