Fix code quality failures