Button bug

Button should only be created if element has a name.