Two bugs from code review