lag fix with JS