Fixes #1 Throws an exception if the first element of the document is not a head-element