Fix php isset error
Fix indenting and add brackets