SimplifiedPHP exception notice and fix weird bug that will need attention later