Added Permission Support and fixed one bracket.