fixed foreman script