Prevent error on button creation