fix longstanding and COMPLETELY IDIOTIC bugs in xpriv. how fucking high was i when i wrote this shit!???