Changed stuff to be with error handler