Fixes misuse of empty().