Fixed custom permissions and optimized a small command