Mobile JS ref fix