Soves some errors