fixed missing "global $SETTINGS;"