Made the StandardHeader detection more robust