Fixed #173 by adding proper error handler function.