unsetted variable to error handler and code stlying
unsetted variable and fixed style