add skip if buffer is empty (bug #79)