Fix empty check