getAttributes fixes bug in IE and FF