fix empty check