script closing tag fix in player, offline check