fi warnings due to -Wunused-but-set-variable