fix two more bugs