fixing localhost execution bug