fix warning
tweak layout code to hide the last separator
fix layout issue on iPad