fixes some errors