Fixing a bug with php 5.2 and the exceptions