fixed somethings with some errors