fix head rules parser