support iOS7 and fix some layout issues