upgrade fork (prevent `Cannot call method 'indexOf' of null`)