bug fixes and work arounds