bug fixes and patches