some errors fixes