fixes
better error handler