Fixed JS for live deployment