bug fixes and exploit fixes