Fix invalid remote scripts being loaded