Fixed the lock-up bug by avoiding to create a new Thread for the action.