Changed sessions to update attribute correctly