Fixing inlinescript for js