code polish

Fix minor defects