Fix bugs from previous checkin