moved permissions before <application> tag