Java script fix