fixes and cleanups