Fixes from Thang + Small fix for ini_set warnings