Optimize permition and some FIX