fix empty checks