fixed less generation bug
integrated getallheaders() alternative