#15 fixed validate_head method