Fix double callback in determineBestFolder.