fixed zero-length error printing bug