added fixes as per suggestions in golang-nuts