fix empty contents issue