Fix writing one byte beyond screen buffer.