Fix getAttribute issue