fixed foreach and the minify locations