fixed issues with --single flag