Fix #3 and checkin earlier changes