Fixed client script when running over crontab