bug fixes and additions