Fixes issue #35

This is an update for PR 233 @ https://github.com/EllisLab/CodeIgniter/pull/322