Fixing mobile JS bugs