some improvements and corrections

Change-Id: I7d5f2a02a3250ca4a806e22be9fa8b0f5f6def52