Update main.php

FIX: Getting property on non-object error