Fix bug with target button click refreshing unexpectedly.