fixed some failing test cases for getAttribute function