Fixed bugs reported by Jay DeYoung