Fix issue #13: Segfault

This was caused by a double delete of pHandler in failure cases.