Updated script enqueuing conditions