fix warnings due to -Wunused-variable