tried to fix ErrorHandler and worked on Database