fixing build and removing unused variable