BUG: Fixed (get|set)attr and added some tests.