[sanchari/priti]reuse condition added for HEADLESS