Fixed some errors throwing