minor bug fixes and alterations