fix empty byte vs nil test problems