changes as per bugs reported