Fixes for unused variable warning