Fixed problem with getAttribute