Update Main.php

This should fix the plugins check for permission.