bunch of exploit fixes related stuff mostly