fixes to the last two problems