Use full/empty conditions rather than just a single condition for the server and encoder.