fixed massive bug in /head handling