Fix for setAttribute method.