Fix apc script success detection