fix error script directly called