Fix issue with simulated button click