Fix assertion
Remove unused variable