managed some errors