more bug fixes and fun stuff