fix some layout bug, add select method