fix two more bugs; thanks frispete