A couple of fixes to undefined variables

Double-check that self::$homes is correct please