fix issues causing errors