Fixing unused variable warnings